package com.cskaoyan.market.controller.admin;

import com.cskaoyan.market.service.admin.MarketRegionService;
import com.cskaoyan.market.util.ResponseUtil;
import com.cskaoyan.market.vo.admin.MarketRegionVo;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @MethodName 商场管理模块行政区域管理
 * @Description 实现显示行政区域列表
 * @Author M
 * @Date 16:20 2023/5/7
 **/
@RequiresAuthentication
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {
    @Autowired
    MarketRegionService adminRegionService;

    @GetMapping("list")
    public Object regionList() {
        // 没有请求参数,不用分页
        List<MarketRegionVo> marketRegionVos = adminRegionService.getMarketRegionList();
        Object o = ResponseUtil.okList(marketRegionVos);
        // 返回请求
        return o;
    }
}
